package com.ldodds.ot.id;

/**
 * Interface implemented by classes that are capable of rewriting between 
 * an identifier and a web identifier for a resource
 * 
 * @author Leigh Dodds
 * @see com.ldodds.ot.Identifiable
 */
public interface IdentifierRewriter {

	/**
	 * Rewrite an absolute URI into a web identifier (relative URI) for a resource
	 * 
	 * @param identifier absolute URI for resource
	 * @return a relative URI
	 */
	String getWebIdentifier(String identifier);
	
	/**
	 * Rewrite a web identifier (relative URI) into an absolute URI for a resource
	 * 
	 * @param webIdentifier a relative URI
	 * @return an absolute URI
	 */
	String getIdentifier(String webIdentifier);
}
